package com.kuang.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

//消费者 运行方式80可省略  例：localhost/consumer/dept/list
//启动类
@SpringBootApplication(scanBasePackages = {"com.kuang"})//扫描API下面的Component组件
@EnableEurekaClient//在服务启动后，自动注册到Eureka注册中心中
@EnableFeignClients(basePackages = {"com.kuang.springclound"})//feign,扫描api下面的@FeignClient注解
//@ComponentScan("com.kuang.springclound") //新版本的springboot不用加
public class DeptConsumer_feign {
    public static void main(String[] args) {
        SpringApplication.run(DeptConsumer_feign.class, args);
    }
}
